package com.atu.poker.util;

import java.util.HashMap;
import java.util.Map;

import com.alibaba.fastjson.JSONObject;

public class RespUtil {

	/**
	 * 返回响应类型编码
	 * @param code
	 * @return
	 */
	public static Object respTypeCode(String code) {
		Map<String, Object> map = new HashMap<>();
		map.put("respType", code);
		return JSONObject.toJSON(map);
	}
	
	public static Object respTypeMessage(String code,String message,String key,Object value) {
		Map<String, Object> map = new HashMap<>();
		map.put("respType", code);
		map.put("message", message);
		map.put(key, value);
		return JSONObject.toJSON(map);
	}
}
